<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/WEB-INF/facelets/templates/colectorT.xhtml">
	<ui:define name="title">CTP</ui:define>
	<ui:define name="content">
		<f:view>
			<h:form>
				<h:panelGrid columns="3">
					<h2><h:outputLabel value="{#usuarioBean.curruntUser}"/></h2>

					<h:outputLabel value="Descripcion" for="descripcion" />
					<h:inputText id="descripcion" value="#{pagoBean.pago.descripcion}" />
					<h:message for="descripcion" />
					

					<f:facet name="footer">
						<h:panelGroup>
							<div class="btn-group">
								<h:commandButton value="Buscar" action="#{pagoBean.buscar}"
									styleClass="btn btn-primary" />
								<h:commandButton value="Limpiar" action="#{pagoBean.clean}"
									styleClass="btn" />
							</div>
						</h:panelGroup>
					</f:facet>
				</h:panelGrid>
				<h:inputHidden value="#{pagoBean.page}" />
				<h:dataTable value="#{pagoBean.pagos}" var="pago"
					styleClass="table table-bordered table-striped">
					<f:facet name="header">
						<h:panelGroup>
							<div class="btn-toolbar">
								<div class="btn-group">
									<h:commandButton action="pago" value="Crear" styleClass="btn" />
									<h:commandButton action="pagoLista" value="Actualizar"
										styleClass="btn" />
								</div>
								<div class="btn-group">
									<h:commandButton value="Anterior" action="#{pagoBean.prevPage}"
										styleClass="btn btn-primary" />
									<h:commandButton value="Pagina #{pagoBean.page + 1}"
										styleClass="btn" />
									<h:commandButton value="Siguiente"
										action="#{pagoBean.nextPage}" styleClass="btn btn-primary" />
								</div>
							</div>
						</h:panelGroup>
					</f:facet>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Colector" />
						</f:facet>
						<h:outputText value="#{pago.idColector}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Carnet" />
						</f:facet>
						<h:outputText value="#{pago.carnet}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="fecha" />
						</f:facet>
						<h:outputText value="#{pago.fecha}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Tipo" />
						</f:facet>
						<h:outputText value="#{pago.tipo}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="descripcion" />
						</f:facet>
						<h:outputText value="#{pago.descripcion}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="monto" />
						</f:facet>
						<h:outputText value="#{pago.monto}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="cuota" />
						</f:facet>
						<h:outputText value="#{pago.cuota}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="Acciones" />
						</f:facet>
						<h:panelGroup>
							<h:commandButton action="pago" value="Actualizar"
								styleClass="btn btn-info">
								<f:setPropertyActionListener target="#{pagoBean.pago}"
									value="#{pago}" />
							</h:commandButton>
							<h:outputText value=" " />
							<h:commandButton action="#{pagoBean.delete}" value="Borrar"
								styleClass="btn btn-danger">
								<f:setPropertyActionListener target="#{pagoBean.cliente}"
									value="#{pago}" />
							</h:commandButton>
						</h:panelGroup>
					</h:column>
					<f:facet name="footer">
						<h:panelGroup>
							<div class="btn-toolbar">
								<div class="btn-group">
									<h:commandButton action="pago" value="Crear" styleClass="btn" />
									<h:commandButton action="pagoLista" value="Actualizar"
										styleClass="btn" />
								</div>
								<div class="btn-group">
									<h:commandButton value="Anterior" action="#{pagoBean.prevPage}"
										styleClass="btn btn-primary" />
									<h:commandButton value="Pagina #{pagoBean.page + 1}"
										styleClass="btn" />
									<h:commandButton value="Siguiente"
										action="#{pagoBean.nextPage}" styleClass="btn btn-primary" />
								</div>
							</div>
						</h:panelGroup>
					</f:facet>
				</h:dataTable>
				<h:inputHidden value="#{pagoBean.page}" />
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>